<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>一条记录</title>
<link href="/styles/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
	function mainpro() {
		var file = document.getElementById("main").value;
		if (file == null || file == "") {

			alert("中央文件为空，请选择");
			return false;
		}
		return true;
	}
	function provincepro() {
		var file = document.getElementById("province").value;
		if (file == null || file == "") {

			alert("省级文件为空，请选择");
			return false;
		}
		return true;
	}
	function citypro() {
		var file = document.getElementById("city").value;
		if (file == null || file == "") {

			alert("市级文件为空，请选择");
			return false;
		}
		return true;
	}
	function ontherpro() {
		var file = document.getElementById("onther").value;
		if (file == null || file == "") {

			alert("中央文件为空，请选择");
			return false;
		}
		return true;
	}
	function forsubmit() {

		var val = confirm("确认提交么，提交后不可修改");
		if (val == false) {

			return false;
		}
		return true;
	}
</script>
</head>
<body>
	<table class="table11" style="margin: 0 auto; width: 60%;">
		<tr>
			<th colspan="3" style="text-align: center;">${date }年度项目填报相关文件</th>
		</tr>
		<tr>
			<th style="width: 70px;">项目类别</th>
			<th style="width: 70px;">文件</th>
			<th style="width: 70px;">操作</th>
		</tr>
		<tr>
			<td>中央级项目</td>
			<td><c:choose>
					<c:when test="${ empty main.pname}">
							无
						</c:when>
					<c:otherwise>
						<a href="#">${main.pname }</a>
					</c:otherwise>
				</c:choose></td>
			<td><c:choose>
					<c:when test="${empty main.pname }">
						<form action="/school/oneupload" method="post"
							enctype="multipart/form-data">
							<input type="hidden" name="xCheckstate" value="-1" /> <input
								type="hidden" name="cCheckstate" value="-1" /> <input
								type="hidden" name="checkPer" value="${checkPer }" /> <input
								type="hidden" name="date" value="${date }" /> <input
								type="hidden" name="projecttype" value="main" /> <input
								type="hidden" name="userid" value="-1" /> <input type="hidden"
								name="pdate" value="${pdate }" /> <input type="hidden"
								name="state" value="0" /> <input type="file" name="file"
								id="main" /><input type="submit" value="上传"
								onclick="return mainpro(); " />
						</form>
					</c:when>
					<c:otherwise>
						<a
							href="/school/deleteproject?userid=-1&projectid=${main.projectid }&date=${date}">修改</a>
					</c:otherwise>
				</c:choose></td>
		</tr>
		<tr>
			<td>省级项目</td>
			<td><c:choose>
					<c:when test="${ empty province.pname}">
							无
						</c:when>
					<c:otherwise>
						<a href="#">${province.pname }</a>
					</c:otherwise>
				</c:choose></td>
			<td><c:choose>
					<c:when test="${empty province.pname }">
						<form action="/school/oneupload" method="post"
							enctype="multipart/form-data">
							<input type="hidden" name="xCheckstate" value="-1" /> <input
								type="hidden" name="cCheckstate" value="-1" /> <input
								type="hidden" name="checkPer" value="${checkPer }" /> <input
								type="hidden" name="date" value="${date }" /> <input
								type="hidden" name="projecttype" value="province" /> <input
								type="hidden" name="userid" value="-1" /> <input type="hidden"
								name="pdate" value="${pdate }" /> <input type="hidden"
								name="state" value="0" /> <input type="file" name="file"
								id="province" /><input type="submit" value="上传"
								onclick="return provincepro();">
						</form>
					</c:when>
					<c:otherwise>
						<a
							href="/school/deleteproject?userid=-1&projectid=${projectid }&date=${date}">修改</a>
					</c:otherwise>
				</c:choose></td>
		</tr>
		<tr>
			<td>市级项目</td>
			<td><c:choose>
					<c:when test="${ empty city.pname}">
							无
						</c:when>
					<c:otherwise>
						<a href="#">${city.pname }</a>
					</c:otherwise>
				</c:choose></td>
			<td><c:choose>
					<c:when test="${empty city.pname }">
						<form action="/school/oneupload" method="post"
							enctype="multipart/form-data">
							<input type="hidden" name="xCheckstate" value="-1" /> <input
								type="hidden" name="cCheckstate" value="-1" /> <input
								type="hidden" name="checkPer" value="${checkPer }" /> <input
								type="hidden" name="date" value="${date }" /> <input
								type="hidden" name="projecttype" value="city" /> <input
								type="hidden" name="userid" value="-1" /> <input type="hidden"
								name="pdate" value="${pdate }" /> <input type="hidden"
								name="state" value="0" /> <input type="file" name="file"
								id="city" /><input type="submit" value="上传"
								onclick="return citypro();">
						</form>
					</c:when>
					<c:otherwise>
						<a
							href="/school/deleteproject?userid=-1&projectid=${city.projectid }&date=${date}">修改</a>
					</c:otherwise>
				</c:choose></td>
		</tr>
		<tr>
			<td>其他项目</td>
			<td><c:choose>
					<c:when test="${ empty onther.pname}">
							无
						</c:when>
					<c:otherwise>
						<a href="#">${onther.pname }</a>
					</c:otherwise>
				</c:choose></td>
			<td><c:choose>
					<c:when test="${empty onther.pname }">
						<form action="/school/oneupload" method="post"
							enctype="multipart/form-data">
							<input type="hidden" name="xCheckstate" value="-1" /> <input
								type="hidden" name="cCheckstate" value="-1" /> <input
								type="hidden" name="checkPer" value="${checkPer }" /> <input
								type="hidden" name="date" value="${date }" /> <input
								type="hidden" name="projecttype" value="onther" /> <input
								type="hidden" name="userid" value="-1" /> <input type="hidden"
								name="pdate" value="${pdate }" /> <input type="hidden"
								name="state" value="0" /> <input type="file" name="file"
								id="onther" /><input type="submit" value="上传"
								onclick="return ontherpro();">
						</form>
					</c:when>
					<c:otherwise>
						<a
							href="/school/deleteproject?userid=-1&projectid=${onther.projectid }&date=${date}">修改</a>
					</c:otherwise>
				</c:choose></td>
		</tr>
	</table>
	填报人： ${sessionScope.user.name } 填报时间： ${pdate }
	<br />
	<br />
	<form action="/school/noeditproject" method="post">
		<input type="hidden" value="${date }" name="date" /> <input
			type="hidden" value="-1" name="userid" /> <input type="submit"
			value="提交" class="btn" id="submit" onclick="return forsubmit();" />&nbsp;&nbsp;
		&nbsp;&nbsp; <input type="button" class="btn" value="返 回"
			onclick="javascript:history.go(-1);" />
	</form>
</body>
</html>